package com.itheima.controller;

import com.itheima.po.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class UserController {
    @RequestMapping("/selectUser")
    public String selectUser(HttpServletRequest request){
        String id=request.getParameter("id");
        System.out.println("id="+id);
        return "success";
    }
    @RequestMapping("/toRegister")
     public String toRegister(){
        return "register";
    }
    @RequestMapping("/registerUser")
    public String registerUser(User user){
        String username=user.getUsername();
       Integer password=user.getPassword();
        System.out.println("username="+username);
        System.out.println("password="+password);
        return "success";
    }
}
